<?php for($i=0; $i<count($mlist); $i++){ ?>        
<table class="product" align="center" cellpadding="5" cellspacing="0" border="0">
	<tr>
	<td width="25%">
	<?php if($mlist[$i]['products_image'] == ""){
		$image ="".$this->site['base_url']."uploads/product/may.png";
	} else {
		$image ="".$this->site['base_url']."uploads/product/".$mlist[$i]['products_image']."";
	}
	?>
	<div align="center" class="div_img">
	<a href="<?php echo $this->site['base_url'].'product/detail/'.$mlist[$i]['products_id'].'/'.$mlist[$i]['master_categories_id'] ?>">
	<img class="img" src="<?php echo $image ?>"/>
	</a>
	</div>
	</td>
	<td>
	<div align="left" class="name">
		<a href="<?php echo $this->site['base_url'].'product/detail/'.$mlist[$i]['products_id'].'/'.$mlist[$i]['master_categories_id'] ?>"><?php echo $mlist[$i]['products_name'] ?></a>
	</div>
	<form method="post" action="<?php echo $this->site['base_url'].'shoppingcart/add/'.$mlist[$i]['products_id'] ?>">  
	<?php if($mlist[$i]['price'] =="" || $mlist[$i]['price'] == 0 || $mlist[$i]['products_qty'] == "" || $mlist[$i]['products_qty'] == 0){ ?>
			<div align="left" class='price'><span class='price'><?php echo Kohana::lang('product_lang.lbl_call') ?></span></div>
	<?php } else {
			$price = $mlist[$i]['price'];
			if($mlist[$i]['products_sale_price'] >= $price || $mlist[$i]['products_sale_price'] == 0){ ?>
			<div align="left" class="price"><span class="price"><?php echo $this->format_currency($price,$this->site['site_currency'])?> &nbsp;</span></div>
			<div align="left" class="price"><input type="submit" class="button" align="center" value="&nbsp;Buy&nbsp;" /></div>									
		<?php } else { ?>
			<div align="left" class="price">
			<span class="price"><strike style="color:#000"><?php echo $this->format_currency($price,$this->site['site_currency'])?></strike></span>
			</div>                                        
			<div align="left" class="price">
			<span class="price"><?php echo $this->format_currency($mlist[$i]['products_sale_price'],$this->site['site_currency'])?></span>
			</div>
			<div align="left" class="price"><input type="submit" class="button" align="center" value="&nbsp;Buy&nbsp;"/></div>
	<?php } } ?>                      
		<input name="txt_item_qty" type="hidden" id="txt_item_qty" value="1" size="2" maxlength="3"/>
		<input type="hidden" name="hd_item_id" id="hd_item_id" value="<?php echo $mlist[$i]['products_id'] ?>" />
	</form>
	<div align="left" class="desc"> 
		<?php  echo $mlist[$i]['products_summary'] ?>
	</div>
	</div>
	</td>
	</tr>
</table>   
<div style="height:5px;border-bottom:1px dotted #CCCCCC;">&nbsp;</div>            			
<?php }	//end foreach ?>